package com.group3.entity;

import java.io.Serializable;
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonProperty;

public class AMerchant implements Serializable {
	private String mId; // 商家id
	private String mName;// 商家name
	@JsonProperty("imageUrl")
	private String mImage;// 商家imgae
	@JsonProperty("idCardUrl")
	private String idCard;// 商家身份证照片
	private String address; // 商家地址
	private String type;// 审核类型:1、待审核，2、通过，3、未通过
	private String reason;// 驳回原因
	private String status;// 商家状态：1、白名单，2、黑名单

	public AMerchant() {
		this.mId = UUID.randomUUID().toString();
	}

	public AMerchant(String mName, String mImage, String idCard,String address,
			String type, String reason, String status) {
		super();
		this.mId = UUID.randomUUID().toString();
		this.mName = mName;
		this.mImage = mImage;
		this.idCard = idCard;
		this.address = address;
		this.type = type;
		this.reason = reason;
		this.status = status;
	}

	public AMerchant(String mId, String mName, String mImage, String idCard,
			String address, String type, String reason, String status) {
		super();
		this.mId = mId;
		this.mName = mName;
		this.mImage = mImage;
		this.idCard = idCard;
		this.address = address;
		this.type = type;
		this.reason = reason;
		this.status = status;
	}

	public String getmId() {
		return mId;
	}

	public void setmId(String mId) {
		this.mId = mId;
	}

	public String getmName() {
		return mName;
	}

	public void setmName(String mName) {
		this.mName = mName;
	}

	public String getmImage() {
		return mImage;
	}

	public void setmImage(String mImage) {
		this.mImage = mImage;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + ((idCard == null) ? 0 : idCard.hashCode());
		result = prime * result + ((mId == null) ? 0 : mId.hashCode());
		result = prime * result + ((mImage == null) ? 0 : mImage.hashCode());
		result = prime * result + ((mName == null) ? 0 : mName.hashCode());
		result = prime * result + ((reason == null) ? 0 : reason.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AMerchant other = (AMerchant) obj;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (idCard == null) {
			if (other.idCard != null)
				return false;
		} else if (!idCard.equals(other.idCard))
			return false;
		if (mId == null) {
			if (other.mId != null)
				return false;
		} else if (!mId.equals(other.mId))
			return false;
		if (mImage == null) {
			if (other.mImage != null)
				return false;
		} else if (!mImage.equals(other.mImage))
			return false;
		if (mName == null) {
			if (other.mName != null)
				return false;
		} else if (!mName.equals(other.mName))
			return false;
		if (reason == null) {
			if (other.reason != null)
				return false;
		} else if (!reason.equals(other.reason))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "AMerchant [mId=" + mId + ", mName=" + mName + ", mImage="
				+ mImage + ", idCard=" + idCard + ", address=" + address
				+ ", type=" + type + ", reason=" + reason + ", status="
				+ status + "]";
	}
	
	

}
